package com.hoki.zj.hrm.domain;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.enums.IdType;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author shukei
 * @since 2021-09-12
 */
@EqualsAndHashCode(callSuper = true)
@TableName("t_login_user")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class LoginUser extends Model<LoginUser> {

    private static final long serialVersionUID = 1L;
    /** 后台 */
    public static final Integer LOGIN_TYPE_ADMIN = 0;
    /** 前台 */
    public static final Integer LOGIN_TYPE_WEBSITE = 1;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    private String username;
    private String password;
    private Integer type;

    @TableField("tenant_id")
    private Long tenantId;
    @TableField("company_name")
    private String companyName;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
